package com.study.student_chuji.demos.Mapper;

import com.study.student_chuji.demos.pojo.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProductMapper {
    public List<Product> getProductList();

    void deleteProductById(Long id);
    Product getProductById(@Param("id") Long id);
    void insertProduct(Product product);
    void updateProduct(Product product);

    List<Product> searchProduct(@Param("name") String name,
                                @Param("min") Integer min,
                                @Param("max") Integer maxAmount,
                                @Param("type") String type);
}
